﻿using Abp.Domain.Entities.Auditing;
using SingleUserMall.Items;
using SingleUserMall.Stores;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingleUserMall.Coupons
{
    /// <summary>
    /// 优惠券
    /// </summary>
    public class Coupon : FullAuditedEntity<long>,IHasStore
    {
        /// <summary>
        /// 商品id
        /// </summary>
        public long ItemId { get; set; }
        [ForeignKey("ItemId")]
        public virtual Item Item { get; set; }
        /// <summary>
        /// 优惠券金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 满足金额
        /// </summary>
        public decimal Condition { get; set; }
        /// <summary>
        /// 有效开始日期
        /// </summary>
        public DateTime BeginTime { get; set; }
        /// <summary>
        /// 有效结束日期
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enabled { get; set; }
        /// <summary>
        /// 店铺id
        /// </summary>
        public int StoreId { get; set; }
    }
}
